#define BUFSIZE MAX_PATH
int printPath()
{
    TCHAR Buffer[BUFSIZE];
    DWORD dwRet;
    dwRet = GetCurrentDirectory(BUFSIZE, Buffer);

    if (dwRet == 0)
    {
        IcDebugPrint(L"GetCurrentDirectory failed (%d)\n", GetLastError());
        return(0);
    }
    if (dwRet > BUFSIZE)
    {
        IcDebugPrint(L"Buffer too small; need %d characters\n", dwRet);
        return(0);
    }
    IcDebugPrint(L"Path %ls\n", (char*)Buffer);
    return 0;
}
VOID
IcDebugPrint(
    _In_z_      PWCHAR                      PFormat,
    ...
)
{
    WCHAR pMessage[MAX_LOG_MESSAGE_LENGTH];

    va_list args;
    va_start(args, PFormat);
    vswprintf_s(pMessage, MAX_LOG_MESSAGE_LENGTH, PFormat, args);
    va_end(args);

    pMessage[MAX_LOG_MESSAGE_LENGTH - 1] = 0;
    wprintf(pMessage);

    OutputDebugStringW(pMessage);
}